#!/usr/bin/env python
# coding=utf-8

# for i in range(100,1000):
#     print(i)


# import math
# num = 153
# a = 1
# b = 5
# c = 3

# if pow(b,3) + pow(a,3) + pow(c, 3) == num :
#     print("yes")



while True:
    try:
        m,n = map(int,input().split(' '))
        sxh = []
        for i in range(m,n+1,1):
            if (i == int(i/100)**3+int(i%100/10)**3+int(i%10)**3):
                sxh.append(i)
        if sxh == []:
            print ('no')
        else:
            for j in range(len(sxh)):
                if j < len(sxh)-1:
                    print (sxh[j],end=' ')
                else:
                    print (sxh[j])
    except:
        break



